import yagmail

def send_mail(filepath):
    mail=yagmail.SMTP(user='2331104379@qq.com',password='krxbalyycwkxdjbj'
                      ,host='smtp.qq.com')
    mail.send(to='2331104379@qq.com',subject='测试日志',contents='发送日志'
              ,attachments=filepath)